<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN">
<head>
    <title><?php echo isset($title)?$title:'Markdown-Editor' ?></title>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <meta name="Keywords" content="<?php echo isset($keywords)?$keywords:''; ?>" />
    <meta name="Description" content="<?php echo isset($description)?$description:''; ?>" />

    <link media="all" type="text/css" href="<?php echo $this->res("css/pure-min.css") ?>" rel="stylesheet">
    <link media="all" type="text/css" href="<?php echo $this->res("css/pure-mine-skin.css") ?>" rel="stylesheet">

    <link media="all" type="text/css" href="<?php echo $this->res("css/admincp.css") ?>" rel="stylesheet">
    <link media="all" type="text/css" href="<?php echo $this->res("css/skin.css") ?>" rel="stylesheet">
    <link media="all" type="text/css" href="<?php echo $this->res("css/main.css") ?>" rel="stylesheet">

    <link href="<?php echo $this->res("lib/jquery/jquery-ui-1.10.2.css") ?>" media="all" rel="stylesheet" type="text/css"/>
    <link href="<?php echo $this->res("lib/codemirror-4.0/lib/codemirror.css") ?>" media="all" rel="stylesheet" type="text/css"/>

    <link href="<?php echo $this->res("css/editor.css") ?>" media="all" rel="stylesheet" type="text/css"/>

    <script type="text/javascript" src="<?php echo $this->res("lib/jquery/jquery-1.7.1.min.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/jquery/jquery-ui-1.10.2.min.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/jquery/jquery.base64.min.js") ?>"></script>

    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/lib/codemirror.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/addon/mode/overlay.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/addon/selection/active-line.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/addon/search/searchcursor.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/addon/search/match-highlighter.js") ?>"></script>

    <script type="text/javascript" src="<?php echo $this->res("js/codemirror.plugins.js") ?>"></script>

    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/mode/javascript/javascript.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/mode/php/php.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/mode/go/go.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/mode/css/css.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/mode/xml/xml.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/mode/markdown/markdown.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/codemirror-4.0/mode/gfm/gfm.js") ?>"></script>

    <script type="text/javascript" src="<?php echo $this->res("lib/marked/lib/marked.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("lib/keymaster/keymaster.min.js") ?>"></script>

    <script type="text/javascript" src="<?php echo $this->res("js/jquery.plugins.js") ?>"></script>
    <script type="text/javascript" src="<?php echo $this->res("js/editor.js") ?>"></script>
</head>

<body style="height: 100%">
<table cellpadding="0" cellspacing="0" width="100%" height="100%">
    <tr>
        <td colspan="2" height="90">
            <div class="mainhd">
                <div class="logo" style="color:#18a622;front-size:20px;">
                    CrossPHP
                </div>
                <div class="uinfo">
                    <p>您好, <em><?php echo $_SESSION["admin"] ?></em> [ <a href="<?php echo $this->link("admin:logout") ?>" target="_top">退出</a> ]</p>
                    <p class="btnlink"><a href="<?php echo SITE_URL."/../web" ?>" target="_blank">网站首页</a></p>
                </div>
                <div class="navbg"></div>
                <div class="nav">
                    <ul id="topmenu">
                        <?php foreach($this->get_nav_menu() as $nav_menu) : ?>
                            <li <?php if(strtolower($this->controller) == $nav_menu["link"]) : ?>class="navon"<?php endif ?>>
                                <em>
                                    <a href="<?php echo $this->link($nav_menu["link"]) ?>">
                                        <?php echo $nav_menu["name"] ?>
                                    </a>
                                </em>
                            </li>
                        <?php endforeach ?>
                    </ul>
                    <div class="currentloca">
                        <p id="cp_news">欢迎使用本系统</p>
                    </div>
                    <div class="navbd"></div>
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td valign="top" width="160" class="menutd" style="height: 100%">
            <div id="leftmenu" class="menu">
                <ul id="menu_global" style="display: block">
                    <?php foreach($this->get_menu() as $m) : ?>
                        <li>
                            <a href="<?php echo $this->link(strtolower($this->controller).':'.$m["link"]) ?>" hidefocus="true">
                                <?php echo $m["name"] ?>
                            </a>
                        </li>
                    <?php endforeach ?>
                </ul>
            </div>
        </td>
        <td valign="top" width="100%" class="mask" id="mainframes">
            <div class="pure-skin-mine" style="padding:0px 10px;">
                <?php echo $content ?>
            </div>
        </td>
    </tr>
</table>
</body>
</html>
